<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>就诊人管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {

		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function select(id, name, card, nickName) {
			window.parent.postMessage({
				message: 'selectPatient',
				'tPatientId': id,
				'tPatientName': name,
				'tPatientCard': card,
				'nickName': nickName
			}, '*');
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
<%--		<li class="active">就诊人列表</li>--%>
<%--		<shiro:hasPermission name="phy:tPatient:edit"><li><a href="${ctx}/phy/tPatient/form">就诊人添加</a></li></shiro:hasPermission>--%>
	</ul>
	<form:form id="searchForm" modelAttribute="tPatient" action="${ctx}/phy/tPatient/listselect" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>身份证号：</label>
				<form:input path="cardLike" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>联系电话：</label>
				<form:input path="mobileLike" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>微信昵称</th>
				<th>姓名</th>
				<th>身份证号</th>
				<th>联系方式</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tPatient" varStatus="i">
			<tr>
				<td>${i.index+1}</td>
				<td>${tPatient.nickName}</td>
				<td>${tPatient.patientName}</td>
				<td>${tPatient.card}</td>
				<td>${tPatient.mobile}</td>
				<td>
    				<a href="javascript:select('${tPatient.id}','${tPatient.patientName}', '${tPatient.card}', '${tPatient.nickName}')">选择</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
